%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*-
%% {erl_opts, [debug_info]}.

%% {so_specs,
%%  [{"priv/bcrypt_nif.so",
%%    ["c_src/*.c"]}]}.
{port_env, [
  {"DRV_LDFLAGS","-shared $ERL_LDFLAGS -lpthread"},
  {"darwin", "DRV_LDFLAGS", "-bundle -flat_namespace -undefined suppress $ERL_LDFLAGS -lpthread"},
  {"solaris", "ERL_LDFLAGS", "-lnsl $ERL_LDFLAGS"},
  {"DRV_CFLAGS","-Ic_src -Wall -fPIC $ERL_CFLAGS"}
]}.

{port_specs, [{"priv/bcrypt_nif.so", ["c_src/*.c"]}]}.

{plugins, [
  {pc, {git, "https://gitee.com/fastdgiot/port_compiler.git", {tag, "v1.11.0"}}}
]}.

{provider_hooks, [
  {pre, [
    {compile, {pc, compile}},
    {clean, {pc, clean}}
  ]}
]}.
